﻿/* index.css */
/* ── Breathing radial gradient from hero center ── */
@keyframes breathe {
    0%,100% {
        opacity: 0.22;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.40;
        transform: translateX(-50%) scale(1.10);
    }
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 860px;
    height: 860px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(125,27,211,0.58) 0%, rgba(222,155,24,0.20) 38%, transparent 68%);
    animation: breathe 7s ease-in-out infinite;
}

/* ── Hero ── */
.hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 60px;
    min-height: 55vh;
}

.hero-logo-wrap {
    position: relative;
    display: inline-block;
}

    .hero-logo-wrap::before {
        content: '';
        position: absolute;
        inset: -55px;
        border-radius: 50%;
        background: radial-gradient(ellipse at center, rgba(125,27,211,0.26) 0%, transparent 70%);
        animation: breathe 5s ease-in-out infinite reverse;
        pointer-events: none;
    }

.hero-logo {
    display: block;
    position: relative;
    width: clamp(200px,30vw,320px);
    height: auto;
    mix-blend-mode: screen;
    filter: brightness(1.12) drop-shadow(0 0 32px rgba(125,27,211,0.5));
    margin-bottom: 28px;
}

.hero-tagline {
    position: relative;
    font-size: clamp(14px,1.6vw,17px);
    font-weight: 400;
    color: rgba(236,230,255,0.55);
    max-width: 480px;
    line-height: 1.7;
}

/* ── Feature cards ── */
.cards-section {
    position: relative;
    z-index: 1;
    padding: 0 clamp(20px,5vw,80px) 80px;
    max-width: 1160px;
    margin: 0 auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
}

.card {
    background: rgba(18,10,36,0.52);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(125,27,211,0.28);
    border-radius: 20px;
    padding: 36px 30px 34px;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 1px;
        background: linear-gradient(90deg,transparent 0%,rgba(125,27,211,0.55) 50%,transparent 100%);
    }

    .card:hover {
        transform: translateY(-5px);
        border-color: rgba(125,27,211,0.52);
        box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    }

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(125,27,211,0.18);
    border: 1px solid rgba(125,27,211,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #bb80ff;
}

    .card-icon svg {
        width: 22px;
        height: 22px;
    }

.card-heading {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.card-body {
    font-size: 14.5px;
    line-height: 1.75;
    color: rgba(236,230,255,0.56);
}

.card--gold .card-icon {
    background: rgba(222,155,24,0.14);
    border-color: rgba(222,155,24,0.28);
    color: #f0be5a;
}

.card--gold::before {
    background: linear-gradient(90deg,transparent,rgba(222,155,24,0.45) 50%,transparent);
}

.card--gold:hover {
    border-color: rgba(222,155,24,0.45);
}

/* ══════════════════════════════════════════
   STORY SECTION — ball falls past text boxes
══════════════════════════════════════════ */
.story-section {
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}

.story-outer {
    position: relative;
}

.story-sticky {
    position: sticky;
    top: calc(64px + 28px);
    display: flex;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px clamp(20px,5vw,60px) 0;
    align-items: flex-start;
    height: calc(100vh - 64px - 28px);
    overflow: visible;
}

.ball-track {
    width: 64px;
    flex-shrink: 0;
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ball-track-line {
    position: absolute;
    top: 0;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, rgba(125,27,211,0.0) 0%, rgba(125,27,211,0.35) 10%, rgba(125,27,211,0.35) 90%, rgba(125,27,211,0.0) 100%);
}

.story-ball {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, #fff 0%, #7D1BD3 45%, #2a0060 100%);
    box-shadow: 0 0 18px rgba(125,27,211,0.7), 0 0 6px rgba(125,27,211,0.9);
    transition: top 0.08s linear;
    top: 0;
    z-index: 2;
}

    .story-ball::after {
        content: '';
        position: absolute;
        top: 3px;
        left: 4px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(255,255,255,0.6);
    }

/* Cards column scrolls via JS translateY — not user scroll */
.story-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow: hidden;
    padding-left: 16px;
    padding-bottom: 0;
    will-change: transform;
    align-self: flex-start;
    height: calc(100vh - 168px);
}

.story-card {
    background: rgba(18,10,36,0.55);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(125,27,211,0.28);
    border-radius: 20px;
    padding: 32px 34px;
    position: relative;
    overflow: hidden;
    opacity: 0.28;
    transform: translateX(16px);
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.3s;
    flex-shrink: 0;
}

    .story-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 8%;
        right: 8%;
        height: 1px;
        background: linear-gradient(90deg,transparent,rgba(125,27,211,0.5) 50%,transparent);
    }

    .story-card.active {
        opacity: 1;
        transform: translateX(0);
        border-color: rgba(125,27,211,0.50);
        box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(125,27,211,0.08);
    }

.story-card--gold::before {
    background: linear-gradient(90deg,transparent,rgba(222,155,24,0.45) 50%,transparent);
}

.story-card--gold.active {
    border-color: rgba(222,155,24,0.45);
}

.story-card-heading {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}

.story-card-body {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(236,230,255,0.58);
}

.story-separator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 clamp(20px,5vw,60px);
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(125,27,211,0.5) 20%, rgba(222,155,24,0.4) 50%, rgba(125,27,211,0.5) 80%, transparent 100%);
    z-index: 10;
}

    .story-separator::after {
        content: '';
        position: absolute;
        left: 60px;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--primary,#7D1BD3);
        box-shadow: 0 0 10px rgba(125,27,211,0.8);
    }

/* Responsive */
@media (max-width:860px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .story-sticky {
        flex-direction: column;
        height: auto;
        position: relative;
        top: auto;
    }

    .ball-track {
        width: 100%;
        height: 40px;
        flex-direction: row;
        align-self: auto;
    }

    .ball-track-line {
        top: 50%;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 2px;
        transform: none;
    }

    .story-ball {
        top: 50% !important;
        transform: translate(0,-50%);
    }

    .story-cards {
        padding-left: 0;
    }
}
